package com.lianxi.hibernate.controller;

import com.lianxi.dao.INewsDao;
import com.lianxi.pojo.News;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/news")
public class NewsController {

    private INewsDao newsDao;



    @GetMapping("/test")
    public void test(){
        News news = newsDao.get(1);
        System.out.println(news);
    }
}
